using System;
using UnityEngine;

[Serializable]
public class InventoryItem 
{
    [SerializeField]private ItemData itemData;
    [SerializeField]private int amount;
   
    public InventoryItem(ItemData itemData)
    {
        this.itemData = itemData;
        AddAmount();
    }
    
    public ItemData GetItemObject()
    {
        return itemData;
    }
    
    public int GetAmount()
    {
        return amount;
    }

    public void AddAmount(int amount =1)
    {
        this.amount += amount;
    }
    
    public void RemoveAmount(int amount =1)
    {
        this.amount -= amount;
    }
}
